home *** CD-ROM | disk | FTP | other *** search
- Path: Rezonet.net!news
- From: ray@ultimate-tech.com (Ray Dunn)
- Newsgroups: comp.lang.c
- Subject: Re: * ISR handlers (interrupt handlers) *
- Date: 25 Jan 1996 04:42:50 GMT
- Organization: Ultimate Technographics Inc.
- Message-ID: <4e71oa$dvl@ns.RezoNet.NET>
- References: <4e6e5i$ddc@acmex.gatech.edu>
- NNTP-Posting-Host: 204.19.230.7
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-Newsreader: WinVN 0.99.7
-
- In referenced article, Israel Denis Jr. says...
- >Does anyone know where I can find some information to
- >code and ISR (interrupt service routine), in c of course.
- >I have seen ISR information in ASSEMBLY. But I don't
- >know assembly.
-
- This is a very system specific question. There are several real
- problems that you have to overcome:
-
- 1. Planting the address of your 'C' ISR routine in the interrupt
- vector.
- 2. Ensuring that the correct stack is used during the execution
- of your code.
- 3. Getting the system specific information that will be passed to
- your ISR when it is executed.
- 4. Ensure the correct exit sequence to restore the machine state.
-
- In addition, you may have to involve yourself with modifying the
- priority levels of the interrupt chain, and reading and writing status,
- data and control information from I/O ports or memory mapped I/O
- locations.
-
- All of this is system specific.
-
- If you are doing this on a Unix system, (I should say *inside* a Unix
- system), you need the hardware details of the machine you are running
- on, a Unix system development environment, and manuals on how to write
- device drivers.
-
- If you want to do it in DOS, it might be easier. There are various
- "API" calls to allow you to plant your routine address in the interrupt
- vector, and return safely, etc - see the descriptions of the DOS
- specific function calls in the library manual that comes with your
- compiler.
-
- In Windows, you can only do it if you have the appropriate Device
- Driver Development Kit - but that will give you all the info you need.
- --
- Ray Dunn (opinions are my own) | Phone: (514) 938 9050
- Montreal | Phax : (514) 938 5225
- ray@ultimate-tech.com | Home : (514) 630 3749
-
-